package com.chenfan.service.impl;

import com.chenfan.mapper.UserMapper;
import com.chenfan.pojo.User;
import com.chenfan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User login(User user) {
        User loginuser=userMapper.getByUSernameAndPassword(user);
        return loginuser;
    }

    @Override
    public List<User> list() {
        List<User> userList=userMapper.list();
        return userList;
    }

}
